package com.shensi.api.admin.client.customer;

import com.shensi.api.admin.client.fallback.customer.CustomerCardRecordConsumptionClientFallBack;
import com.shensi.api.admin.domian.customer.dto.CustomerCardRecordConsumptionDto;
import com.shensi.common.core.constant.CloudConstant;
import com.shensi.common.core.domain.AjaxResult;
import com.shensi.common.core.page.TableDataInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author: budian
 * @since: 2023/11/30
 */
@FeignClient(
        value = CloudConstant.ADMIN_SERVER,
        fallbackFactory = CustomerCardRecordConsumptionClientFallBack.class)
@Component
public interface CustomerCardRecordConsumptionClient {
    /**
     * 查询客户电子会员卡消费记录列表
     */
    @GetMapping("/customer/consumption/list")
    public TableDataInfo list(@SpringQueryMap CustomerCardRecordConsumptionDto customerCardRecordConsumption);

    /**
     * 导出客户电子会员卡消费记录列表
     */
    @GetMapping("/customer/consumption/export")
    public AjaxResult export(@SpringQueryMap CustomerCardRecordConsumptionDto customerCardRecordConsumption);

    /**
     * 获取客户电子会员卡消费记录详细信息
     */
    @GetMapping(value = "/customer/consumption/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id);

    /**
     * 新增客户电子会员卡消费记录
     */
    @PostMapping("/customer/consumption")
    public AjaxResult add(@RequestBody CustomerCardRecordConsumptionDto customerCardRecordConsumption);

    /**
     * 修改客户电子会员卡消费记录
     */
    @PutMapping("/customer/consumption")
    public AjaxResult edit(@RequestBody CustomerCardRecordConsumptionDto customerCardRecordConsumption);

    /**
     * 删除客户电子会员卡消费记录
     */
    @DeleteMapping("/customer/consumption/{ids}")
    public AjaxResult remove(@PathVariable("ids") Long[] ids);

    /**
     * 获取客户电子会员卡消费汇总金额
     */
    @GetMapping(value = "/customer/consumption/xfAmtQuery")
    public AjaxResult xfAmtQuery(@SpringQueryMap CustomerCardRecordConsumptionDto customerCardRecordConsumption);

    /**
     * 获取客户电子会员卡消费汇总折线图x 轴数据
     */
    @GetMapping(value = "/customer/consumption/listXdata")
    public TableDataInfo listXdata(@SpringQueryMap CustomerCardRecordConsumptionDto customerCardRecordConsumption);

    /**
     * 获取客户电子会员卡消费汇总折线图充值数据
     */
    @GetMapping(value = "/customer/consumption/listQydataXF")
    public TableDataInfo listQydataXF(@SpringQueryMap CustomerCardRecordConsumptionDto customerCardRecordConsumption);

}
